<!-- 写在开头，用以继承 -->
{% extends "base.html" %}

<!-- 标题模块被重载 -->
{% block title %}Index{% endblock %}

<!-- head模块被重载，并且，使用super继承了base.html中head的内容 -->
{% block head %}
    {{ super() }}
    <style type="text/css"> .important { color: #336699; } </style>
{% endblock %}

<!-- 覆盖了content模块 -->
{% block content %}
    <h1>This is h1 content</h1>
    <p class="important">Welcome on my awesome homepage.</p>
{% endblock %}

{% block footer %}
    <h1>This is h2 footer</h1>
    <p class="important">Welcome on my awesome homepage2.</p>
{% endblock %}